﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using CashFlow.Db.Entity;
using CashFlow.Web.Def;
using CashFlow.Web.Areas.ShopManage.Models.Order.Result;

namespace CashFlow.Web.Areas.ShopManage.Service
{
    public interface IOrderService : IService<OrderEntity>
    {
        IList<OrderDetailInfoModel> QueryByWhere(
            int shopManagerUserId
            , string date
            , string orderNo
            , string buyer
            , string seller
            , int? state);

        bool IsOrderIdValid(int orderId
            , string date
            , int shopManageUserId);

        EUpdateOrderResult UpdateOrder(int orderId
            , string date
            , int buyerUserId
            , int sellerUserId
            , decimal amount);

        bool IsExistOrder(int shopManagerUserId, string date);

        bool ReleaseOrder(int shopManagerUserId, string date);

        ECreateOrderResult CreateOrder(int buyerUserId
            , int sellerUserId
            , decimal amount
            , string date);

        IList<OrderBuyerInfoModel> QueryOrderByDate(
            int shopManagerUserId
            , string date);
    }
}